import os
from langchain.memory import ConversationBufferMemory
from langchain.chains import ConversationChain
from langchain.llms import OpenAI
os.environ["OPENAI_API_KEY"] = '读者申请的OpenAI API Key'
conversation_with_memory = ConversationChain(
llm = OpenAI(temperature=0), memory=ConversationBufferMemory(), verbose=True)
conversation_with_memory.predict(input="你好，我是Kevin")
conversation_with_memory. predict(input="我是一个人工智能大模型爱好者，喜欢通过公众号分享人工智能知识")
conversation_with_memory.predict(input="我希望你能根据我所提供的信息，为公众号设计一个专业名称")
conversation_with_memory.predict(input="你还可以给出更多选项吗")